﻿using Authority.DataTransferObject.ActionAuthority;
using Authority.DataTransferObject.Subsystem;
using Authority.Doamin;
using Authority.IServices.Model.Action;
using Authority.IServices.Model.Subsystem;

namespace Authority.ServiceImpls.Profile
{
    public class SubsystemProfile : AutoMapper.Profile
    {
        public SubsystemProfile()
        {
            CreateMap<AddSubsystemModel, Subsystem>()
                .ForMember(m => m.DateAddTime, s => s.Ignore())
                .ForMember(m => m.DateUpTime, s => s.Ignore())
                .ForMember(m => m.IsDelete, s => s.Ignore())
                .ForMember(m => m.ID, s => s.Ignore());

            CreateMap<EditSubsystemModel, Subsystem>()
                .ForMember(m => m.DateAddTime, s => s.Ignore())
                .ForMember(m => m.DateUpTime, s => s.Ignore())
                .ForMember(m => m.IsDelete, s => s.Ignore())
                .ForMember(m => m.ID, s => s.Ignore());

            CreateMap<Subsystem, SubsystemDTO>();
            CreateMap<Subsystem, SubsystemListDTO>();
        }
    }
}
